package com.mairuide.inspectionReport.information.service;

import com.mairuide._frame.base.BaseRepository;
import com.mairuide._frame.base.BaseServiceProxy;
import com.mairuide.inspectionReport.information.dao.TencentQQDao;
import com.mairuide.inspectionReport.information.entity.TencentQQ;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @Auther: zyj
 * @Date: 2019/5/13 10:26
 * @Description:
 */
@Service
public class TencentQQService extends BaseServiceProxy<TencentQQ> {

    @Autowired
    private TencentQQDao tencentQQDao;

    @Override
    protected BaseRepository<TencentQQ> getBaseRepository() {
        return tencentQQDao;
    }

    public List<String> findByTelephone(List<String> tel){
        List<TencentQQ> list = tencentQQDao.findByTelephoneIn(tel);
        List<String> qqNumber=list.stream().map(TencentQQ::getQqNumber).collect(Collectors.toList());
        return qqNumber;
    }
}
